<?php
		require("../dbconnect.php");
		require("../function.php");

		$country_code=$_GET["country_id"];
		$tagname=trim($_GET["tag"]);
		$page="1";
		if(!empty($_GET['multiple']))
		{
			$multiple="multiple";
		}else{
			$multiple="";
		}
		
		if(!empty($_GET['getshipping']))
		{
			$getshipping="onchange='getShipping(this.value)'";
		}else{
			$getshipping="";
		}
		
		$get_place=mysql_query("select * from os_state where country_id='$country_code'");
		if(mysql_num_rows($get_place)==0)
		{
			$content= "
			<select name='".$tagname."'  id='".$tagname."' class=text>
			<option value='-1'>other</option></select>";	
		}
		else
		{
			
		$content= "
			
			<select name='".$tagname."' id='".$tagname."' class=text $multiple $getshipping>";
			
			if($multiple=="")
			{
			$content.="<option value=''>Please select</option>";
			}
			
			
			while($p=mysql_fetch_array($get_place,MYSQL_ASSOC))
			{
				$content.="<option value='".$p['id']."'>".$p['name_eng']."</option>";
			}
		
		}
		$content.="</select>";
		
		if(!empty($_GET['getshipping']))
		{
			$content.="<img src='images/loadscript.gif' onload='changeShippingCompany($country_code)' >";
		}else{
			$content.="";
		}
		
		echo $content;
		
?>